package xyz.zhzby.cyzx.cms.convert;

import io.swagger.annotations.ApiModel;
import org.mapstruct.Mapper;
import org.mapstruct.NullValueCheckStrategy;
import org.mapstruct.NullValuePropertyMappingStrategy;
import org.mapstruct.factory.Mappers;
import xyz.zhzby.cyzx.cms.dto.response.TagResponse;
import xyz.zhzby.cyzx.cms.entity.Tag;

import java.util.List;

/**
 * @author zby
 * @date 2021/12/11
 */
@ApiModel("文章标签相关转换器")
@Mapper(nullValuePropertyMappingStrategy = NullValuePropertyMappingStrategy.IGNORE, nullValueCheckStrategy = NullValueCheckStrategy.ALWAYS)
public interface TagConvert {

    TagConvert INSTANCE = Mappers.getMapper(TagConvert.class);

    TagResponse TAG_RESPONSE(Tag tag);

    List<TagResponse> TAG_RESPONSE_LIST(List<Tag> tags);

}
